package com.sds.smarthome.foundation.entity;

import com.google.gson.JsonElement;

import java.io.Serializable;
import java.util.List;

public final class LoginResponse {

    private String id;
    private String username;
    private String token;
    private String phoneNum;
    private String nickName;
    private String birthday;
    private String profileImageUrl;
    private String sex;
    private JsonElement appUi;

    private List<BindSmartDevs> bindSmartDevs;
    private List<SharedSmartDevs> sharedSmartDevs;

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPhoneNum() {
        return phoneNum;
    }

    public void setPhoneNum(String phoneNum) {
        this.phoneNum = phoneNum;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getProfileImageUrl() {
        return profileImageUrl;
    }

    public void setProfileImageUrl(String profileImageUrl) {
        this.profileImageUrl = profileImageUrl;
    }

    public JsonElement getAppUi() {
        return appUi;
    }

    public void setAppUi(JsonElement appUi) {
        this.appUi = appUi;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }

    public List<BindSmartDevs> getBindSmartDevs() {
        return bindSmartDevs;
    }

    public void setBindSmartDevs(List<BindSmartDevs> bindSmartDevs) {
        this.bindSmartDevs = bindSmartDevs;
    }

    public List<SharedSmartDevs> getSharedSmartDevs() {
        return sharedSmartDevs;
    }

    public void setSharedSmartDevs(List<SharedSmartDevs> sharedSmartDevs) {
        this.sharedSmartDevs = sharedSmartDevs;
    }

    public final class BindSmartDevs implements Serializable {
        private String id;
        private String nickName;
        private String productId;
        private String deviceId;
        private String accessKey;
        private String bindCcuId;
        private boolean online;
        private List<String> shareToUsers;

        public List<String> getShareToUsers() {
            return shareToUsers;
        }

        public void setShareToUsers(List<String> shareToUsers) {
            this.shareToUsers = shareToUsers;
        }


        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getBindCcuId() {
            return bindCcuId;
        }

        public void setBindCcuId(String bindCcuId) {
            this.bindCcuId = bindCcuId;
        }

        public String getNickName() {
            return nickName;
        }

        public void setNickName(String nickName) {
            this.nickName = nickName;
        }

        public String getProductId() {
            return productId;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public String getDeviceId() {
            return deviceId;
        }

        public void setDeviceId(String deviceId) {
            this.deviceId = deviceId;
        }

        public String getAccessKey() {
            return accessKey;
        }

        public void setAccessKey(String accessKey) {
            this.accessKey = accessKey;
        }

        public boolean isOnline() {
            return online;
        }

        public void setOnline(boolean online) {
            this.online = online;
        }
    }

    public final class SharedSmartDevs implements Serializable {

        private String id;
        private String nickName;
        private String productId;
        private String deviceId;
        private String accessKey;
        private boolean online;
        private String shareFromUser;
        private DeviceDependentUserInfo deviceDependentUserInfo;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getNickName() {
            return nickName;
        }

        public void setNickName(String nickName) {
            this.nickName = nickName;
        }

        public String getProductId() {
            return productId;
        }

        public void setProductId(String productId) {
            this.productId = productId;
        }

        public String getDeviceId() {
            return deviceId;
        }

        public void setDeviceId(String deviceId) {
            this.deviceId = deviceId;
        }

        public String getAccessKey() {
            return accessKey;
        }

        public void setAccessKey(String accessKey) {
            this.accessKey = accessKey;
        }

        public boolean isOnline() {
            return online;
        }

        public void setOnline(boolean online) {
            this.online = online;
        }

        public String getShareFromUser() {
            return shareFromUser;
        }

        public void setShareFromUser(String shareFromUser) {
            this.shareFromUser = shareFromUser;
        }

        public DeviceDependentUserInfo getDeviceDependentUserInfo() {
            return deviceDependentUserInfo;
        }

        public void setDeviceDependentUserInfo(DeviceDependentUserInfo deviceDependentUserInfo) {
            this.deviceDependentUserInfo = deviceDependentUserInfo;
        }
    }

    public static class DeviceDependentUserInfo implements Serializable {
        private List<UserGroupInfo> userGroups;
        private UserAuthority authority;

        public List<UserGroupInfo> getUserGroups() {
            return userGroups;
        }

        public void setUserGroups(List<UserGroupInfo> userGroups) {
            this.userGroups = userGroups;
        }

        public UserAuthority getAuthority() {
            return authority;
        }

        public void setAuthority(UserAuthority authority) {
            this.authority = authority;
        }
    }

    public static class UserGroupInfo implements Serializable {
        private String groupName;
        private int groupId;

        public String getGroupName() {
            return groupName;
        }

        public void setGroupName(String groupName) {
            this.groupName = groupName;
        }

        public int getGroupId() {
            return groupId;
        }

        public void setGroupId(int groupId) {
            this.groupId = groupId;
        }
    }

    public static class UserAuthority implements Serializable {
        private boolean accessPermission;
        private List<String> workRooms;

        public boolean isAccessPermission() {
            return accessPermission;
        }

        public void setAccessPermission(boolean accessPermission) {
            this.accessPermission = accessPermission;
        }

        public List<String> getWorkRooms() {
            return workRooms;
        }

        public void setWorkRooms(List<String> workRooms) {
            this.workRooms = workRooms;
        }
    }
}
